<h2>Avatar</h2>
<%= form_tag("upload", :multipart => true) do %>
<fieldset>
	<legend>
		<%= @title %>
	</legend>
	<%= error_messages_for 'avatar' %>
	<% if @user.avatar.exists? %>
	<div class="form_row">
		<label for="current_avatar">Avatar:</label>
		<%= avatar_tag(@user) %>
		[<%= link_to "Eliminar", { :action => "delete" },
		:confirm => "Seguro que quiere eliminar su avatar?" %>]
	</div>
	<% end %>
	<div class="form_row">
		<label for="new_avatar">Nuevo Avatar:</label>
		<%= file_field "avatar", "image" %>
	</div>
	<%= submit_tag "Subir Avatar", :class => "submit" %>
</fieldset>
<% end %> 